# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test05
# Description:
# Author:       ASUS
# Date:         2019/3/25
#-------------------------------------------------------------------------------


import re
#字符集将字符串拆成单个字符，再使用或关系，将字符集写在一起，相当于字符串的连接
m = re.match("[ab][cd][ef][gh]","adfh")
print(m.group())
m = re.match("[ab][cd][ef][gh]","bceg")
print(m.group())
m = re.match("[ab][cd][ef][gh]","abceh")
print(m)

#字符集和普通文本模式字符串混合使用,ab相当于前缀
m = re.match("ab[cd][ef][gh]","abceh")
print(m.group())
print(m)






